home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 11
/
Cream of the Crop 11-1.iso
/
games
/
dcgames4.zip
/
INITGAME.SCR
< prev
next >
Wrap
Text File
|
1995-10-02
|
5KB
|
150 lines
!
! FILE : initgame.scr
!
! DESCRIPTION
! Example introduction script. This script is executed when the game
! is first started. A party of a single player has been created with
! initial values set to those found in statistics record # 0, with
! the following additions:
!
! group.gold = 1000; (1000 silver or 100 gold)
! group.food = 25;
! player.name = "John Doe";
! player.type = 0; ! 'REGULAR' in the standard DCCTOKEN.DAT file
! player.class = 0; ! 'HUMAN' in the standard DCCTOKEN.DAT file
! player.level = 1;
! player.experience = 1;
! player.energy = 1000;
!
! You may change any group and/or player attributes in this script, and
! may call the 'edit_player()' function to invoke the character creation
! screen. This function accepts a the following parameters:
!
! edit_player( which, (1 to 6, required)
! points to distribute (0 to 40, default 25),
! min attribute value (0 to 255, default 9),
! max attribute value (0 to 255, default 20),
! allow-name-edit (1 = yes, 0 = no, default 1),
! allow-class-edit (1 = yes, 0 = no, default 1),
! allow-block-edit (1 = yes, 0 = no, default 1),
! allow-attribute-0-edit (1 = yes, 0 = no, default 1),
! allow-attribute-1-edit (1 = yes, 0 = no, default 1),
! ... );
!
! Only the first parameter is required, all others may be omitted.
!
! Note that the automatic adjustments for 'class' are now part of this
! script, instead of part of the 'edit_player' function. They occur
! AFTER character creation. A small price to pay for the flexibility
! provided by 'edit_player'.
!
! If you don't wan't to use the character creation screen, you may set
! the attributes in many different ways, for example:
!
! You might get the name this way:
! :XLOOP
! write( "What is your name: " );
! L0 = getstr( "Hey You" );
! if S0 = "" goto XLOOP; ! You HAVE to enter a name
! player.name = S0;
!
! You might set the class using a menu, as follows:
! L0 = select( "Wizard", "Elf", "Dwarf" );
! on L0 goto XWIZ, XELF, XDWARF;
! :XWIZ player.class = WIZARD; goto XNEXT;
! :XELF player.class = ELF; goto XNEXT;
! :XDWARF player.class = DWARF; goto XNEXT;
! :XNEXT
!
! Or directly...
! player.class = ELF;
!
! The standard attributes can be set directly in statistics record # 0
! (using the DCWORLD program) or in this script by direct assignment.
!
! The usual values in the standard statistics record # 0 for the attribute
! fields is a 9.
!
!------------------------------------------------------------------------!
! Record how much memory is left after starting the game driver just
! in case I run into memory problems later and want to know this info.
system( "mem /C >freemem.xxx" );
if failure then
writeln( "Couldn't run FREEMEM.XXX. Press <space>" );
pause;
endif;
! Do the initial sequence of music, graphics, etc
!
music ( "intro1.cmf" ); ! Play background music
viewpcx ( "intro1.pcx" ); ! Show a nice picture
wait ( 120 );
music ( "intro2.cmf" ); ! Play background music
readtext( "intro1.txt" ); ! Read some text.
!
! Now, create the player's character by using 'edit_player'
!
edit_player( 1 );
on player.class goto XHUMAN,XELF,XDWARF,XWIZARD,XARCHER,XFIGHTER;
! any other, drop into 'XHUMAN'
:XHUMAN
goto DONE; ! No adjustments for 'Humans'
:XELF
inc( player.mspd );
dec( player.mstr );
inc( player.mpwr );
goto DONE;
:XDWARF
inc( player.mstr );
inc( player.mdex );
dec( player.mspd, 2 );
inc( player.mhp, 2 );
goto DONE;
:XWIZARD
inc( player.miq, 2 );
inc( player.mpwr, 3 );
dec( player.mstr, 3 );
dec( player.mhp, 2 );
goto DONE;
:XARCHER
inc( player.maim, 2 );
inc( player.mspd, 2 );
dec( player.mstr, 2 );
goto DONE;
:XFIGHTER
inc( player.mstr, 4 );
inc( player.mhp, 2 );
inc( player.miq, 4 );
goto DONE;
:DONE
! Here, you may transfer the party to any location at which you wish
! the game to start. For example, to start in world 3, 2 squares
! south (down) and 5 right from the location of door 7, use:
!
! teleport( 3, world.doorx(7) + 5, world.doory(7) - 2 );
!
! You may also set the group's X and Y location directly if you wish
! to alter the location within world zero.
!
! The default start location is right over the location of door 0 in
! world 0.
!
dec( group.y ); ! Start example game 1 square above door 0 in world 0
music( stop );
STOP; ! Use CONTINUE if you want the driver to invoke edit_player()